package com.taiji.dianthus.service.http;


import com.alibaba.fastjson.JSONArray;
import com.taiji.dianthus.common.BusinessMessage;

import java.util.Map;

/**
 * @InterfaceName HttpAPIService
 * @Description httpClient service层
 * @Author H.M
 * @Date 2020/5/7
 */
public interface HttpAPIService {

    /**
     * 不带参get请求
     * @param url
     * @return
     */
    BusinessMessage doGet(String url);

    /**
     * 带参get请求
     * @param url
     * @param
     * @return
     */
    BusinessMessage doGet(String url,  Map<String, Object> map);

    /**
     * 带参post请求
     * @param url
     * @param map
     * @return
     */
    BusinessMessage doPost(String url, Map<String, Object> map);

    /**
     * 带参post请求
     * @param url
     * @param jsonArray
     * @return
     */
    BusinessMessage doPost(String url, JSONArray jsonArray);

    /**
     * 带参post请求
     * @param url
     * @param param
     * @return
     */
    BusinessMessage doPost(String url, String param);


    /**
     * 不带参post请求
     * @param url
     * @return
     */
    BusinessMessage doPost(String url);

    /**
     * 查询链接可访问
     * @param url
     * @return
     */
    BusinessMessage isAddressable(String url);
}
